<div class="layui-header">
    <div class="layui-logo">后台管理系统</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item"><a class="jsh-nav-one" href="javascript:;"><i class="layui-icon layui-icon-home layui-icon-menu"></i>主页</a></li>
      <li class="layui-nav-item"><a class="jsh-nav-two" href=""><i class="layui-icon layui-icon-refresh layui-icon-menu"></i>刷新</a></li>
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
          贤心
        </a>
        <dl class="layui-nav-child">
          <dd><a href="">基本资料</a></dd>
          <dd><a href="">安全设置</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item"><a href="javascript:;" id='outLogin'>退出</a></li>
    </ul>
  </div>


<script>
  layui.use(['jquery','layer'],()=>{
      let form = layui.form;
      let $ = layui.$;

      $("#outLogin").on("click",()=>{
        layer.confirm("是否退出系统？",{
          btn: ['退出','取消']
        },()=>{
          $.get('./login/outLogin',(resData)=>{
            if(resData)
              window.location.replace('./login');
            else
              layer.msg("退出失败，请重试！");
          });
        })
      })
  })
</script>